home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / dsp / srffttar.z / srffttar / SRFFT / fftoutf.c < prev    next >
C/C++ Source or Header  |  1991-08-26  |  2KB  |  89 lines

  1. /* ------------------------- fftoutf.c -------------------------------- */
  2. /*                                    */
  3. /* Author:    Eyal Lebedinsky                        */
  4. /* Date:    May 1990                        */
  5. /* Version:    9 June 1991                        */
  6. /*                                    */
  7. /* called from fftg.c and generates function calls            */
  8. /*                                    */
  9. /* This program is released into the public domain.            */
  10. /*                                    */
  11. /*----------------------------------------------------------------------*/
  12.  
  13. #include <stdio.h>
  14.  
  15. static int    label = 0;
  16.  
  17. void
  18. start_fft (file_name, ep_name)
  19. char    *file_name, *ep_name;
  20. {
  21.     char    fname[256];
  22.  
  23.     strcpy (fname, file_name);
  24.     strcat (fname, ".c");
  25.  
  26.     freopen (fname, "wt", stdout);
  27.     printf ("void %s(){\n", ep_name);
  28. }
  29.  
  30. void
  31. end_fft (file_name, ep_name)
  32. char    *file_name, *ep_name;
  33. {
  34.     printf ("}\n");
  35.     close (stdout);
  36. }
  37.  
  38. void
  39. fft1 (i1)
  40. int    i1;
  41. {
  42.     printf ("_fft1(%d);\n", i1);
  43. }
  44.  
  45. void
  46. fft2 (i1, i2)
  47. int    i1, i2;
  48. {
  49.     printf ("_fft2(%d,%d);\n", i1, i2);
  50. }
  51.  
  52. void
  53. fft3 (i1, i3, i4)
  54. int    i1, i3, i4;
  55. {
  56.     printf ("_fft3(%d,%d,%d);\n", i1, i3, i4);
  57. }
  58.  
  59. void
  60. fft4 (i1, i2, i3, i4, cc1)
  61. int    i1, i2, i3, i4, cc1;
  62. {
  63.     printf ("_fft4(%d,%d,%d,%d,0x%04x);\n", i1, i2, i3, i4, cc1);
  64. }
  65.  
  66. void
  67. fft5 (i1, i2, i3, i4, i5, i6, i7, i8, sm1, sp1, cc1, sm3, sp3, cc3, ind)
  68. int    i1, i2, i3, i4, i5, i6, i7, i8, sm1, sp1, cc1, sm3, sp3, cc3, ind;
  69. {
  70.     printf ("_fft5(%d,%d,%d,%d,%d,%d,%d,%d,",
  71.         i1, i2, i3, i4, i5, i6, i7, i8);
  72.     printf ("0x%04x,0x%04x,0x%04x,0x%04x,0x%04x,0x%04x,%d);\n",
  73.         sm1, sp1, cc1, sm3, sp3, cc3, ind);
  74. }
  75.  
  76. void
  77. fft7 (i1, i2)
  78. int    i1, i2;
  79. {
  80.     printf ("_fft7(%d,%d);\n", i1, i2);
  81. }
  82.  
  83. void
  84. fft8 (i1, i2, i3)
  85. int    i1, i2, i3;
  86. {
  87.     printf ("_fft8(%d,%d,%d);\n", i1, i2, i3);
  88. }
  89.